TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi | tutorial showing how to train , convert , and run | Machine Learning library

 by   EdjeElectronics Jupyter Notebook Version: Current License: Apache-2.0

kandi X-RAY | TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi Summary

kandi X-RAY | TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi Summary

TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi is a Jupyter Notebook library typically used in Artificial Intelligence, Machine Learning, Deep Learning, Tensorflow applications. TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

TensorFlow Lite is an optimized framework for deploying lightweight deep learning models on resource-constrained edge devices. TensorFlow Lite models have faster inference time and require less processing power, so they can be used to obtain faster performance in realtime applications. This guide provides step-by-step instructions for how train a custom TensorFlow Object Detection model, convert it into an optimized format that can be used by TensorFlow Lite, and run it on Android phones or the Raspberry Pi. The guide is broken into three major portions. Each portion will have its own dedicated README file in this repository. This repository also contains Python code for running the newly converted TensorFlow Lite model to perform detection on images, videos, or webcam feeds.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi has a medium active ecosystem.
              It has 1342 star(s) with 617 fork(s). There are 47 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 60 open issues and 82 have been closed. On average issues are closed in 542 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi is current.

            kandi-Quality Quality

              TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi has 0 bugs and 0 code smells.

            kandi-Security Security

              TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi and discovered the below as its top functions. This is intended to give you an instant insight into TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi implemented functionality, and help decide if they suit your requirements.
            • Create a tf example example
            • Convert xml file to csv
            • Refresh the camera
            • Read the last frame
            • Split a Pandas DataFrame into multiple files
            Get all kandi verified functions for this library.

            TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi Key Features

            No Key Features are available at this moment for TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi.

            TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi Examples and Code Snippets

            No Code Snippets are available at this moment for TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi.

            Community Discussions

            QUESTION

            ModuleNotFoundError: No module named 'tensorflow_io'
            Asked 2021-Nov-15 at 13:40

            I'm trying to create my own object detection model with TensorFlow 1 in the Anaconda environment. I wanted to use TensorFlow 1.15 and I followed this tutorial https://github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi

            Cuz I'm new to this I followed tutorials on how to set up TensorFlow when I reach the step on setting up TensorFlow, I used the command pip install . to install TensorFlow using the setup.py in the research directory

            After the installation, I used the command to test the TensorFlow setup to verify it works:

            python builders\model_builder_tf1_test.py

            However, I face the below error:

            ...

            ANSWER

            Answered 2021-Nov-15 at 07:56

            Try to install the library using pip:

            Source https://stackoverflow.com/questions/69970867

            QUESTION

            Workflow for converting .pb files to .tflite
            Asked 2020-Jul-01 at 22:49

            Overview

            I know this subject has been discussed many times, but I am having a hard time understanding the workflow, or rather, the variations of the workflow.

            For example, imagine you are installing TensorFlow on Windows 10. The main goal being to train a custom model, convert to TensorFlow Lite, and copy the converted .tflite file to a Raspberry Pi running TensorFlow Lite.

            The confusion for me starts with the conversion process. After following along with multiple guides, it seems TensorFlow is often install with pip, or Anaconda. But then I see detailed tutorials which indicate it needs to be built from source in order to convert from TensorFlow models to TFLite models.

            To make things more interesting, I've also seen models which are converted via Python scripts as seen here.

            Question

            So far I have seen 3 ways to do this conversion, and it could just be that I don't have a grasp on the full picture. Below are the abbreviated methods I have seen:

            1. Build from source, and use the TensorFlow Lite Optimizing Converter (TOCO):

              bazel run --config=opt tensorflow/lite/toco:toco -- --input_file=$OUTPUT_DIR/tflite_graph.pb --output_file=$OUTPUT_DIR/detect.tflite ...

            2. Use the TensorFlow Lite Converter Python API:

              ...

            ANSWER

            Answered 2020-Jul-01 at 22:49

            There is no difference in the output from different conversion methods, as long as the parameters remain the same. The Python API is better if you want to generate TFLite models in an automated way (for eg a Python script that's run periodically).

            The TensorFlow Lite Optimizing Converter (TOCO) was the first version of the TF->TFLite converter. It was recently deprecated and replaced with a new converter that can handle more ops/models. So I wouldn't recommend using toco:toco via bazel, but rather use tflite_convert as mentioned here.

            You should never have to build the converter from source, unless you are making some changes to it and want to test them out.

            Source https://stackoverflow.com/questions/62678345

            QUESTION

            How can I use tensorflow lite to detect specific object without retraining
            Asked 2020-May-12 at 22:16

            I'm trying to use tensorflow lite in raspberry pi to detect specific category (motorcycle only) using the pre-trained model. Since the motorcycle category is already existing in the pre-trained model, I assume that I don't need any to retrain it. Is there anyway to remove other objects in the model? I am using the code from Edje Electronics provided by this link: https://github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi

            '''

            ...

            ANSWER

            Answered 2020-Apr-02 at 11:58

            I've solved my own problem by adding these lines of code inside the for loop.

            for i in range(len(scores)):

            Source https://stackoverflow.com/questions/60989775

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi

            To convert the frozen graph we just exported into a model that can be used by TensorFlow Lite, it has to be run through the TensorFlow Lite Optimizing Converter (TOCO). Unfortunately, to use TOCO, we have to build TensorFlow from source on our computer. To do this, we’ll create a separate Anaconda virtual environment for building TensorFlow. This part of the tutorial breaks down step-by-step how to build TensorFlow from source on your Windows PC. It follows the Build TensorFlow From Source on Windows instructions given on the official TensorFlow website, with some slight modifications. This guide will show how to build either the CPU-only version of TensorFlow or the GPU-enabled version of TensorFlow v1.13. If you would like to build a version other than TF v1.13, you can still use this guide, but check the build configuration list and make sure you use the correct package versions. If you are only building TensorFlow to convert a TensorFlow Lite object detection model, I recommend building the CPU-only version! It takes very little computational effort to export the model, so your CPU can do it just fine without help from your GPU. If you’d like to build the GPU-enabled version anyway, then you need to have the appropriate version of CUDA and cuDNN installed. The TensorFlow installation guide explains how to install CUDA and cuDNN. Check the build configuration list to see which versions of CUDA and cuDNN are compatible with which versions of TensorFlow.
            Microsoft Build Tools 2015 Update 3 - Use the default installation options in the install wizard. Once you begin installing, it goes through a fairly large download, so it will take a while if you have a slow internet connection. It may give you some warnings saying build tools or redistributables have already been installed. If so, that's fine; just click through them.
            Microsoft Visual C++ 2015 Redistributable Update 3 – This may give you an error saying the redistributable has already been installed. If so, that’s fine.

            Support

            This guide uses "train.py" to run training on the TFLite detection model. The train.py script is deprecated, but the model_main.py script that replaced it doesn't log training progress by default, and it requires pycocotools to be installed. Using model_main.py requires a few extra setup steps, and I want to keep this guide as simple as possible. Since there are no major differences between train.py and model_main.py that will affect training (see TensorFlow Issue #6100), I use train.py for this guide. Here’s how you can check the version of TensorFlow you used for training. In case you run into error error C2100: illegal indirection during TensorFlow compilation, simply edit the file tensorflow-build\tensorflow\tensorflow\core\framework\op_kernel.h, go to line 405, and change reference operator*() { return (*list_)[i_]; } to reference operator*() const { return (*list_)[i_]; }. Credits go to: https://github.com/tensorflow/tensorflow/issues/15925#issuecomment-499569928.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi.git

          • CLI

            gh repo clone EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi

          • sshUrl

            git@github.com:EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link